//
// Created by liushuai on 2020/5/5.
//
#include "getMaxDepth.h"
int getMaxDepth(TreeNode* root){
    if(root){
        int left_depth = getMaxDepth(root->left)+1;
        int right_depth = getMaxDepth(root->right)+1;
        int result = left_depth>right_depth?left_depth:right_depth;
        return result;
    }else
        return 0;
}
